package com.xc.c1

import java.util
import collection.mutable.{HashMap => scalaMap}

object hashmap1 {

  def main(args: Array[String]): Unit = {
    val ss = new util.HashMap[Integer, String]()
    ss.put(1, "a")
    ss.put(2, "b")
    ss.put(3, "c")

    var xx = new scalaMap[Int, String]
    for(x <- ss.keySet().toArray()){
//      xx.put(x.asInstanceOf[Int],ss.get(x))
      xx += (x.asInstanceOf[Int] -> ss.get(x))
    }

    println(xx.mkString(" , "))

    xx.keysIterator.foreach(println)
  }

}
